package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 领卷
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_collect_card")
public class CollectCard extends Model<CollectCard> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "cid", type = IdType.ASSIGN_ID)
    private String cid;
    /**
     * 名称
     */
    @TableField("name")
    private String name;
    /**
     * 备注
     */
    @TableField("note")
    private String note;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 计划ID
     */
    @TableField("plan_id")
    private String planId;
    /**
     * 推广码
     */
    @TableField("promotion_code")
    private String promotionCode;
    /**
     * 分享葵花码
     */
    @TableField("qr_code")
    private String qrCode;
    /**
     * 码数量
     */
    @TableField("allocated_quantity")
    private Integer allocatedQuantity;
    /**
     * 码可用数量
     */
    @TableField("available_quantity")
    private Integer availableQuantity;

    public void freeData() {
        this.cid = null;
        this.name = null;
        this.note = null;
        this.addTime = null;
        this.updateTime = null;
        this.planId = null;
        this.promotionCode = null;
        this.qrCode = null;
        this.allocatedQuantity = null;
        this.availableQuantity = null;
    }

}
